package  wibrst.keyboard{
	/**
	 * ...
	 * @author wibrst@qq.com
	 */
	public class KeyAndChar{
		
		public function KeyAndChar() {
			
		}
		
		static public function getKeyCodeOfChar( ch:String ):int {
			//trace( "getKeyCodeOfChar:", ch );
			return _dictChar2KeyCode[ ch ];
		}
		
		static private const _dictChar2KeyCode:Object = {
			// for window.document.onkeypress
			"0": 96,
			"1": 97,
			"2": 98,
			"3": 99,
			"4": 100,
			"5": 101,
			"6": 102,
			"7": 103,
			"8": 104,
			"9": 105,
			
			"*": 106,
			"#": 109,
			
			// for window.document.onkeydown  window.document.onkeyup
			"`": 96,
			"a": 97,
			"b": 98,
			"c": 99,
			"d": 100,
			"e": 101,
			"f": 102,
			"g": 103,
			"h": 104,
			"i": 105,
			
			"j": 106,
			"m": 109
		}
		
	}

}